<template>
  <div>
    <Return :txt="txt" style="background: #eeeeee"></Return>
    <div class="time" @click="show = true">2020年8月</div>
    <div class="mouey">
      <div class="mouey1" v-for="(item,index) in 10" :key="index" @click="indexId = index" :class="{bgred:index == indexId}">{{ item }}</div>
    </div>
    <div class="linhe"></div>
    <div class="cell">
      <div class="cell1">
        <div class="cell2 border1"></div>
      </div>
      <div class="cell1">
        <div class="cell2">08:00</div>
        <input type="text" placeholder="请输入当前工作内容" />
      </div>
      <div class="cell1">
        <div class="cell2">09:00</div>
        <input type="text" />
      </div>
      <div class="cell1">
        <div class="cell2">10:00</div>
        <input type="text" />
      </div>
      <div class="cell1">
        <div class="cell2">11:00</div>
        <input type="text" />
      </div>
      <div class="cell1">
        <div class="cell2">12:00</div>
        <input type="text" />
      </div>
      <div class="cell1">
        <div class="cell2 border2"></div>
      </div>
    </div>
    <div class="linhe"></div>
    <div>
        <span class="pishi">上级批示：</span>
    </div>
    <van-popup v-model="show" position="bottom">
      <van-datetime-picker
        v-model="currentDate"
        type="year-month"
        title="选择年月"
        :min-date="minDate"
        @cancel="show = false"
        @confirm="onCoshownfirm"
        :max-date="maxDate"
        :formatter="formatter"
      />
    </van-popup>
  </div>
</template>
<script>
import Return from "../../../components/return";
export default {
  components: {
    Return,
  },
  data() {
    return {
      indexId:1,
      txt:'日报表',
      minDate: new Date(2020, 0, 1),
      maxDate: new Date(2025, 10, 1),
      currentDate: new Date(),
      show: false,
    };
  },
  methods:{
formatter(){
 if (type === 'year') {
        return `${val}年`;
      } else if (type === 'month') {
        return `${val}月`;
      }
      return val;
}
  },
  created(){
    if(this.$route.query.name){
      this.txt = this.$route.query.name
    }
  },
};
</script>
<style scoped>

.time {
  margin: 20px 10%;
  width: 80%;
  height: 40px;
  background: #4AC7D7;
  line-height: 40px;
  text-align: center;
  border-radius: 5px;
  color: white;
}
.mouey {
  margin: 5px 5%;
  width: 90%;
  height: 40px;
  background: #16A5B6;
  text-align: center;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}
.mouey1 {
  width: 8.8%;
  border-left: 1px solid #cbcbcb;
  height: 40px;
  line-height: 40px;
}
.title {
  height: 30px;
  width: 97%;
  padding-left: 3%;
  background: #f2f2f2;
  font-size: 13px;
  color: #cecece;
  line-height: 30px;
}
.msg {
  width: 100%;
  height: 300px;
  text-align: center;
  line-height: 300px;
  border-bottom: 5px solid #eee;
}
.linhe {
  width: 100%;
  height: 15px;
  background: #eee;
  margin-bottom: 5px;
}
.cell {
  width: 96%;
  height: auto;
  margin-left: 2%;
}
.cell1 {
  width: 100%;
  height: 40px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #ccc;
}
.cell2 {
  width: 15%;
  background: #16A5B6;
  text-align: center;
  height: 40px;
  line-height: 40px;
  color: #fff;
}
.cell1 input {
  height: 40px;
  margin-left: 10px;
  border: none;
}
.border1 {
  border-radius: 50px 50px 0 0;
}
.border2 {
  border-radius: 0 0 50px 50px;
}
.pishi{
    margin: 20px;
    font-size: 20px;
}
.bgred{
  background: red;
}
</style>